<php>if(empty($stype))$stype	= 'sale';
$map['brandid'] = $brandid;
$map['stype'] 	= $stype;
$searchResult 	= service('Product')->search4User($map);
</php>
<script>
var _stype = '{$stype}';
var _currentbrandid = '{$brandid}';
$(document).ready(function(){
	k_initcollectionbtn();
});
function goPage(pno){
	$.kajax({      
		url:"{:U('Product://Brand/ajxSearchGoods')}",      
		type:'post', //数据发送方式  
		data:{brandid:_currentbrandid,stype:_stype,pno:pno} ,    
		async: false ,//同步方式     
		success: function(html){ 
			$('#ajx_show_area').html(html);
		}
	});
}
</script>		

		<div class="list_title">
		<div>排序：</div>
			<dl class="sel_opt" style="width:880px">
				<dt> 
					<span onclick="_stype='sale';goPage(1);" 	class="bynew <php>if($stype=='sale'){</php>sorted<php>}</php>" title="销量：从高到低" >畅销</span>
					<span onclick="_stype='new';goPage(1);" 	class="bynew <php>if($stype=='new'){</php>sorted<php>}</php>" title="按时间排序" 	>最新</span> 
					<span onclick="_stype='down';goPage(1);" 	class="byup <php>if($stype=='down'){</php>sorted<php>}</php>" title="价格：由高到低" >价格由高到低</span> 
					<span onclick="_stype='up';	goPage(1);" 	class="byup <php>if($stype=='up'){</php>sorted<php>}</php>" title="价格：由低到高" >价格由低到高</span>
				</dt>
				<dd><span>共{$searchResult['count']}个商品，
        				当前在 {$searchResult['nowPage']}/{$searchResult['totalPages']} 页</span>
		        	<span class="prep" 
		        			<php>if($searchResult['nowPage']>1){
		        					echo "onclick='javascript:goPage(".($searchResult['nowPage']-1).")'";
		        				 }</php> >&nbsp;</span>
		        	<span class="nextp">
		        		<a href="javascript:void(0)" 
		        			<php>if($searchResult['nowPage']<$searchResult['totalPages']){
		        				 	echo "onclick='javascript:goPage(".($searchResult['nowPage']+1).")'";
		        				 }</php>
		        		>下一页</a></span>
		       	</dd>
			</dl>
		</div>
		<div style="padding:0px 0px 0px 13px;">
			<php>$index = -1;</php>
	    	<volist id="vo" name="searchResult['data']">
	      		<include file="../Product/Tpl/default/Public/product_brief_detail_box.html" />
	      	</volist>
		</div>
		<div id="clear"></div>
		
		<div class="page_box">{$searchResult['html']}</div>
		
		<div id="clear"></div>
		
		